class AuthorTests extends GroovyTestCase {

    void testSaveAuthorWithoutPublication() {
        Author silvio = new Author(lastname:'Wangler', firstname:'Silvio')
        assert silvio.save()
    }

    void testSaveAuthorWithPublication() {
        Author silvio = new Author(lastname:'Wangler', firstname:'Silvio')
        silvio.addToPublications(new Publication(title:'Silly you', releaseDate: new Date(), description:'A silly story', path:'/home/saw'))
        assert silvio.save()
    }
}
